<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function onblurFun() {
            //console 是控制台对象，是由JavaScript 语言提供，专门用来向浏览器的控制器打印输出（相当于java中的System.out.println），用于测试
            //log()就是打印方法
            console.log("静态注册失去焦点");
        }
        window.onload = function () {
            var password = document.getElementById("password");
            password.onblur = function () {
                console.log("动态注册失去焦点");
            }
        }
    </script>
</head>
<body>
注册<br/>
<table >

    <tr><td align = "right">用户名：<input type="text" onblur="onblurFun()"></td></tr>
    <tr><td align = "right">密码：<input type="password" id="password"></td></tr>
    <tr><td align = "right">确认密码：<input type="password"></td></tr>
</table>


</body>
</html>